package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 房产信息历史表
 *
 * @author zhiyuan
 * @since 2023-09-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eduh_house")
@Schema(name = "EduhHouse", title = "房产信息历史表", description = "房产信息历史表实体类")
public class EduhHouse extends Model<EduhHouse> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "houseId", description = "房产id")
    @TableId(value = "house_id", type = IdType.ASSIGN_ID)
    private String houseId;

    @Schema(name = "taskDetailId", description = "任务详情id")
    @TableField(value = "task_detail_id")
    private String taskDetailId;

    @Schema(name = "houseNum", description = "房产编码")
    @TableField(value = "house_num")
    private String houseNum;

    @Schema(name = "address", description = "地址")
    @TableField(value = "address")
    private String address;

    @Schema(name = "addressId", description = "关联地址id")
    @TableField(value = "address_id")
    private String addressId;

    @Schema(name = "registerDate", description = "登记日期")
    @TableField(value = "register_date")
    private Date registerDate;

    @Schema(name = "realProperty", description = "不动产权号")
    @TableField(value = "real_property")
    private String realProperty;

    @Schema(name = "realPropertyNum", description = "不动产单元号 国标")
    @TableField(value = "real_property_num")
    private String realPropertyNum;

    @Schema(name = "begDate", description = "土地使用开始日期")
    @TableField(value = "beg_date")
    private Date begDate;

    @Schema(name = "endDate", description = "土地使用结束日期")
    @TableField(value = "end_date")
    private Date endDate;

    @Schema(name = "yearLimit", description = "使用年限")
    @TableField(value = "year_limit")
    private Integer yearLimit;

    @Schema(name = "landCategories", description = "土地用途key")
    @TableField(value = "land_categories")
    private String landCategories;

    @Schema(name = "landCategoriesName", description = "土地用途value")
    @TableField(value = "land_categories_name")
    private String landCategoriesName;

    @Schema(name = "houseNature", description = "房屋性质key")
    @TableField(value = "house_nature")
    private String houseNature;

    @Schema(name = "houseNatureName", description = "房屋性质value")
    @TableField(value = "house_nature_name")
    private String houseNatureName;

    @Schema(name = "longitude", description = "经度")
    @TableField(value = "longitude")
    private BigDecimal longitude;

    @Schema(name = "latitude", description = "纬度")
    @TableField(value = "latitude")
    private BigDecimal latitude;

    @Schema(name = "street", description = "所属街道")
    @TableField(value = "street")
    private String street;

    @Schema(name = "useQueryFlag", description = "是否查询过3年内使用")
    @TableField(value = "use_query_flag")
    private String useQueryFlag;

    @Schema(name = "useQueryRemark", description = "查询3年内使用备注")
    @TableField(value = "use_query_remark")
    private String useQueryRemark;

    @Schema(name = "useFlag", description = "3年内是否使用")
    @TableField(value = "use_flag")
    private String useFlag;

    @Schema(name = "availableSchool", description = "房产证可就读学校")
    @TableField(value = "available_school")
    private String availableSchool;

    @Schema(name = "primarySchoolOne", description = "可就读小学顺位1")
    @TableField(value = "primary_school_one")
    private String primarySchoolOne;

    @Schema(name = "primarySchoolTwo", description = "可就读小学顺位2")
    @TableField(value = "primary_school_two")
    private String primarySchoolTwo;

    @Schema(name = "primarySchoolThree", description = "可就读小学顺位3")
    @TableField(value = "primary_school_three")
    private String primarySchoolThree;

    @Schema(name = "primarySchoolFour", description = "可就读小学顺位4")
    @TableField(value = "primary_school_four")
    private String primarySchoolFour;

    @Schema(name = "juniorSchoolOne", description = "可就读初中顺位1")
    @TableField(value = "junior_school_one")
    private String juniorSchoolOne;

    @Schema(name = "juniorSchoolTwo", description = "可就读初中顺位2")
    @TableField(value = "junior_school_two")
    private String juniorSchoolTwo;

    @Schema(name = "juniorSchoolThree", description = "可就读初中顺位3")
    @TableField(value = "junior_school_three")
    private String juniorSchoolThree;

    @Schema(name = "juniorSchoolFour", description = "可就读初中顺位4")
    @TableField(value = "junior_school_four")
    private String juniorSchoolFour;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "qlrName", description = "权利人姓名")
    @TableField(value = "qlr_name")
    private String qlrName;

    @Schema(name = "qlrNum", description = "权利人个数")
    @TableField(value = "qlr_num")
    private Integer qlrNum;

    @Schema(name = "remark", description = "备注")
    @TableField(value = "remark")
    private String remark;

    @Schema(name = "status", description = "房产状态")
    @TableField(value = "status")
    private String status;

    @Schema(name = "authStatus", description = "0.待审核1.已审核 其他.不可用")
    @TableField(value = "auth_status")
    private String authStatus;

    @Schema(name = "del", description = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "areaCode", description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "encryptStatus", description = "加密状态 0待加密  1加密成功  2加密失败")
    @TableField(value = "encrypt_status")
    private String encryptStatus;

    @Schema(name = "encryptRemarks", description = "加密备注")
    @TableField(value = "encrypt_remarks")
    private String encryptRemarks;

    @Schema(name = "encryptTime", description = "加密时间")
    @TableField(value = "encrypt_time")
    private Date encryptTime;

    @Schema(name = "encryptFlag", description = "是否已加密  1是  0否")
    @TableField(value = "encrypt_flag")
    private String encryptFlag;

    @Schema(name = "cleanFlag", description = "是否销毁 1是 0 否")
    @TableField(value = "clean_flag")
    private String cleanFlag;

    @Override
    public Serializable pkVal() {
        return this.houseId;
    }
}
